from clutter import Texture
from cluttergst import VideoSink

class CustomVideoTexture(Texture):
    def __init__(self, pipeline, element_name="touchwizard_sink"):
        self.pipeline = pipeline
        Texture.__init__(self)
        self.videosink = VideoSink(self)
        sink_pad = pipeline.get_by_name(element_name)
        pipeline.add(self.videosink)
        sink_pad.link(self.videosink)

